package com.rgp.apidriver.controller;

import com.rgp.apidriver.service.ApiOrderService;
import com.rgp.internalcommon.dto.OrderDto;
import com.rgp.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author nhp
 * @version 1.0
 * @description TODO
 * @date 2024-04-26 16:42
 */
@RestController
public class ApiOrderController {

    @Autowired
    private ApiOrderService apiOrderService;

    @PostMapping("/order/to-pick-up-passenger")
    public ResponseResult toPickUpPassenger(@RequestBody OrderDto orderDto){
        return apiOrderService.toPickUpPassenger(orderDto);
    }

    @PostMapping("/order/driver-arrive-departure")
    public ResponseResult driverArriveDeparture(@RequestBody OrderDto orderDto){
        return apiOrderService.driverArriveDeparture(orderDto);
    }

    @PostMapping("/order/pick-up-passenger")
    public ResponseResult pickUpPassenger(@RequestBody OrderDto orderDto){
        return apiOrderService.pickUpPassenger(orderDto);
    }

    @PostMapping("/order/passenger-get-off")
    public ResponseResult passengerGetoff(@RequestBody OrderDto orderDto){
        return apiOrderService.passengerGetoff(orderDto);
    }
}
